import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import CreateMessage from './components/CreateMessage.vue'
import ReadMessage from './components/ReadMessage.vue'
import '@fortawesome/fontawesome-free/css/all.css';

const routes = [
  {
    path: '/',
    name: 'Create',
    component: CreateMessage
  },
  {
    path: '/read/:accessKey',
    name: 'Read',
    component: ReadMessage
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

const app = createApp(App)
app.use(router)
app.mount('#app')
